package com.gao.a_hello;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author gao
 * @time 2022/07/04 23:44:51
 */
//@Component
@RabbitListener(queuesToDeclare = @Queue("hello_queue"))
public class Consumer {
    @RabbitHandler
    public void receive(String msg) {
        System.out.println("msg = " + msg);
    }
}
